<template>
	<div id="div1">
		<el-form ref="form" :model="user" label-width="80px">
			<el-form-item label="用户名">
				<el-input v-model="user.name"></el-input>
			</el-form-item>
			<el-form-item label="密码">
				<el-input type="password" v-model="user.psw"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button type="primary"  @click="register()">立即创建</el-button>
				<el-button>取消</el-button>
			</el-form-item>
		</el-form>
	</div>
</template>
<style scoped>
	#div1{
		width: 400px;
		margin: 0 auto;
	}
</style>
<script>
	export default {
		data: function() {
			return {
				user: {
					name: "",
					psw: ""
				}
			};
		},
		mounted: function() {},
		methods: {
			register: function() {
				console.log(this.user);
			}
		}
	};
</script>
